import { computed, toRef } from 'vue'
export function usePosition(pos) {
  const tmpPos = toRef(pos)
  const STEP = 32
  const position = computed(() => {
    return {
      left: tmpPos.value.x * STEP + 'px',
      top: tmpPos.value.y * STEP + 'px',
    }
  })
  return position
}
